#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
xxx= {"11":11, "yy": 22}
# for x, y in xxx.items():
#     print(x,y)
# del xxx['11']
# print(xxx)
# print(len(xxx))
# xxx['zz'] =33
# print(xxx)
# print(xxx.pop('zz'))
# print(xxx)
# yyy = [1,2,3,4]
# for i in yyy:
#     print(i)



class ResultJson:
    def __init__(self):
        self.code = 0
        self.msg = ""
        self.data = []

    def to_json(self):
        return self.__dict__


def json_to(msg):
    result = ResultJson()
    print(msg)
    if msg['flag']:
        result.code = "10000"
        result.data.append(msg)
    else:
        result.code = "10001"
        result.data.append(msg)
    return result.to_json()


x = 'show=inmaps:xx=yy'
print(x.find('&'))

x= [('alembic_version',), ('firewalld',), ('inmaps',), ('outmaps',), ('users',)]
name = "outmaps"



# res = [name for i in x if name == i[0]]
# print(res)
# # res=[]
# print(all([res,]))

# def func(a, b=[]):
#    b += [a]
#    print(b)
#
# func(1)
# func(2, [])
# func(3)

# a={"a1": 1}
# b={"1":2}
# c={"c1":3}
# a.update(b)
# a.update(c)
# import json
#
# aj1 = json.dumps(a)
# print(aj1, type(aj1))

a=[1,2,3,4]
